wittrup Posted 12 hours ago Posted 12 hours ago Hello I want to disable console on /dev/ttyS2 on a Radxa ROCK 4C+ running rock@rockpi-4cplus:/boot$ cat /etc/os-release | grep -v URL PRETTY_NAME="Armbian 25.5.0-trunk.40 noble" NAME="Ubuntu" VERSION_ID="24.04" VERSION="24.04 LTS (Noble Numbat)" VERSION_CODENAME=noble ID=ubuntu ID_LIKE=debian UBUNTU_CODENAME=noble LOGO="armbian-logo" ARMBIAN_PRETTY_NAME="Armbian 25.5.0-trunk.40 noble" There are posts and other information out there. For instance: https://docs.armbian.com/User-Guide_Fine-Tuning/#how-to-toggle-boot-output which leads to http://redsymbol.net/linux-kernel-boot-parameters/ rock@rockpi-4cplus:/boot$ grep console armbianEnv.txt console=both The information found so far, implies there are options like: none, serial, both, and another But what is the another option? So that I can disable console on /dev/ttyS2 and use that for other purposes. Without compromising the Docs reccomandation: To disable console entirely (not recommended) set console to none 0 Quote
SteeMan Posted 12 hours ago Posted 12 hours ago moved to correct forum and added the proper tag 0 Quote
wittrup Posted 11 hours ago Author Posted 11 hours ago Thanks @SteeMan Made me stumble upon something similar. Found armbianmonitor rock@rockpi-4cplus:~$ sudo armbianmonitor -u Checked the log. [ 2.614818] ff180000.serial: ttyS0 at MMIO 0xff180000 (irq = 35, base_baud = 1500000) is a 16550A [ 2.616480] ff1a0000.serial: ttyS2 at MMIO 0xff1a0000 (irq = 36, base_baud = 1500000) is a 16550A Changed armbianEnv.txt from: console=both To: console=ttyS0 Then a reboot. That didn't work. So changing the boot.cmd from: setenv console "both" To: setenv console "ttyS0" Then mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr and reboot. ttyS2 console are still enabled. Connections are verified by reading the connected pins after forcing communication root@rockpi-4cplus:/home/rock# stty -F /dev/ttyS2 115200 cs8 -parenb -cstopb root@rockpi-4cplus:/home/rock# while true; do echo -n "A" > /dev/ttyS2; sleep 0.25; done Connected pins 8 & 10: And log still says: [ 2.615671] ff180000.serial: ttyS0 at MMIO 0xff180000 (irq = 35, base_baud = 1500000) is a 16550A [ 2.616076] serial serial0: tty port ttyS0 registered [ 2.617411] ff1a0000.serial: ttyS2 at MMIO 0xff1a0000 (irq = 36, base_baud = 1500000) is a 16550A [ 2.617621] printk: legacy console [ttyS2] enabled What would be the next step here? 0 Quote
wittrup Posted 11 hours ago Author Posted 11 hours ago Continuing ... root@rockpi-4cplus:~# cp /boot/dtb/rockchip/rk3399-rock-4c-plus.dtb rk3399-rock-4c-plus.dtb.backup root@rockpi-4cplus:~# dtc -I dtb -O dts -o rk3399-rock-4c-plus.dts rk3399-rock-4c-plus.dtb.backup rk3399-rock-4c-plus.dts: Warning (unit_address_vs_reg): /usb@fe800000: node has a unit name, but no reg or ranges property rk3399-rock-4c-plus.dts: Warning (unit_address_vs_reg): /usb@fe900000: node has a unit name, but no reg or ranges property rk3399-rock-4c-plus.dts: Warning (avoid_unnecessary_addr_size): /dsi@ff960000: unnecessary #address-cells/#size-cells without "ranges", "dma-ranges" or child "reg" property rk3399-rock-4c-plus.dts: Warning (avoid_unnecessary_addr_size): /dsi@ff968000: unnecessary #address-cells/#size-cells without "ranges", "dma-ranges" or child "reg" property rk3399-rock-4c-plus.dts: Warning (unique_unit_address): /pcie@f8000000: duplicate unit-address (also used in node /pcie-ep@f8000000) root@rockpi-4cplus:~# root@rockpi-4cplus:~# vi rk3399-rock-4c-plus.dts rk3399-rock-4c-plus.dts is attached. Here is the relevant sections I've found: / { model = "Radxa ROCK 4C+"; aliases { serial2 = "/serial@ff1a0000"; }; serial@ff1a0000 { compatible = "rockchip,rk3399-uart\0snps,dw-apb-uart"; reg = <0x00 0xff1a0000 0x00 0x100>; clocks = <0x08 0x53 0x08 0x162>; clock-names = "baudclk\0apb_pclk"; interrupts = <0x00 0x64 0x04 0x00>; reg-shift = <0x02>; reg-io-width = <0x04>; pinctrl-names = "default"; pinctrl-0 = <0x49>; status = "okay"; phandle = <0xe7>; }; __symbols__ { uart2 = "/serial@ff1a0000"; }; }; What should I do to disable /dev/ttyS2 console? rk3399-rock-4c-plus.dts 0 Quote
IBV Posted 1 hour ago Posted 1 hour ago Hi, in general you can set status = "disabled"; in a dts to disable a component. 0 Quote
wittrup Posted 1 hour ago Author Posted 1 hour ago Thanks. Would this disable the ttyS2 entirely, or disable the console on ttyS2? 0 Quote
IBV Posted 1 hour ago Posted 1 hour ago This would disable it entirely, which is probably not what you want... It looks like the the the kernel is not picking up the console parameter: Kernel command line: root=UUID=d0636019-ca11-404a-9874-04e6cbfedf37 rootwait rootfstype=ext4 splash plymouth.ignore-serial-consoles console=ttyS2,1500000 console=tty1 consoleblank=0 loglevel=1 ubootpart=8dc56fe2-01 usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory [ 0.000000] Unknown kernel command line parameters "splash ubootpart=8dc56fe2-01 cgroup_enable=memory cgroup_memory=1", will be passed to user space. Maybe post here the boot.cmd and armbianEnv.txt 0 Quote
wittrup Posted 32 minutes ago Author Posted 32 minutes ago Well spotted, thanks armbianEnv.txt verbosity=1 bootlogo=true console=ttyS0 overlay_prefix=rockchip rootdev=UUID=d0636019-ca11-404a-9874-04e6cbfedf37 rootfstype=ext4 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u boot.cmd (complete file attached): rock@rockpi-4cplus:~$ grep -i console /boot/boot.cmd setenv console "ttyS0" if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "console=ttyS2,1500000 ${consoleargs}"; fi if test "${earlycon}" = "on"; then setenv consoleargs "earlycon ${consoleargs}"; fi setenv consoleargs "splash plymouth.ignore-serial-consoles ${consoleargs}" setenv consoleargs "splash=verbose ${consoleargs}" setenv bootargs "root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}" boot.cmd 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.